import time

import akshare as ak

# A股指数 历史行情数据 东财
# http://quote.eastmoney.com/center/hszs.html
code = "000300"
df = ak.index_zh_a_hist(symbol=code)
date = time.strftime("%Y%m%d", time.localtime())
df.to_excel(f"A股指数-{code}-历史行情数据-{date}.xlsx", index=False)